home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12336 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: acs5.bu.edu!lachesis
  2. From: lachesis@bu.edu (wai yip)
  3. Newsgroups: comp.lang.c
  4. Subject: modularity and data hiding
  5. Date: 30 Mar 1996 18:48:08 GMT
  6. Organization: Boston University
  7. Message-ID: <4jjvl9$phl@news.bu.edu>
  8. NNTP-Posting-Host: acs5.bu.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. hmmm, i seem to be posting here everytime i get a new homework
  12. assignment...don't know if it's a good thing.  anyway, i seem to have a
  13. problem understanding data hiding.  i have an assignment which requires me to
  14. store 3 letter airport codes in a binary search tree.
  15. i have to do it using modularity and data hiding with 5 files(a main file,
  16. interface.c file, implementation.c file, interface.h file and an
  17. implementation.h file).
  18.  
  19. what i don't understand is why i need so many files.  in the book i read, they
  20. only discussed the necessity for an interface.h file which stores declarations
  21. and definitions for prototypes and the implementation.c file which has all the
  22. functions for accessing the tree.
  23.  
  24. so why do i need a .c and .h file for both the implementation and interface
  25. files?  am i missing some important point in data hiding?
  26. hope i don't sound too stupid posting these types of questions ^_^
  27. any help would be appreciated.
  28.